package com.google.android.exoplayer2.text.webvtt;

import android.text.Layout.Alignment;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import o.anr;

public final class WebvttCssStyle {
    private int ʻ;
    private Alignment ʻॱ;
    private int ʼ;
    private boolean ʽ;
    private List<String> ˊ;
    private int ˊॱ;
    private String ˋ;
    private int ˋॱ;
    private String ˎ;
    private String ˏ;
    private int ˏॱ;
    private float ͺ;
    private String ॱ;
    private int ॱˊ;
    private boolean ॱॱ;
    private int ᐝ;

    public WebvttCssStyle() {
        ˏ();
    }

    public void ˏ() {
        this.ˏ = "";
        this.ˋ = "";
        this.ˊ = Collections.emptyList();
        this.ॱ = "";
        this.ˎ = null;
        this.ॱॱ = false;
        this.ʽ = false;
        this.ʻ = -1;
        this.ˏॱ = -1;
        this.ॱˊ = -1;
        this.ˊॱ = -1;
        this.ˋॱ = -1;
        this.ʻॱ = null;
    }

    public void ˏ(String str) {
        this.ˏ = str;
    }

    public void ˊ(String str) {
        this.ˋ = str;
    }

    public void ˋ(String[] strArr) {
        this.ˊ = Arrays.asList(strArr);
    }

    public void ॱ(String str) {
        this.ॱ = str;
    }

    public int ˏ(String str, String str2, String[] strArr, String str3) {
        if (!this.ˏ.isEmpty() || !this.ˋ.isEmpty() || !this.ˊ.isEmpty() || !this.ॱ.isEmpty()) {
            int ˎ = ˎ(ˎ(ˎ(0, this.ˏ, str, 1073741824), this.ˋ, str2, 2), this.ॱ, str3, 4);
            if (ˎ == -1 || !Arrays.asList(strArr).containsAll(this.ˊ)) {
                return 0;
            }
            return (this.ˊ.size() * 4) + ˎ;
        } else if (str2.isEmpty()) {
            return 1;
        } else {
            return 0;
        }
    }

    public int ॱ() {
        int i = 0;
        if (this.ॱˊ == -1 && this.ˊॱ == -1) {
            return -1;
        }
        int i2 = this.ॱˊ == 1 ? 1 : 0;
        if (this.ˊॱ == 1) {
            i = 2;
        }
        return i2 | i;
    }

    public boolean ˊ() {
        return this.ʻ == 1;
    }

    public boolean ˎ() {
        return this.ˏॱ == 1;
    }

    public WebvttCssStyle ˊ(boolean z) {
        this.ˏॱ = z ? 1 : 0;
        return this;
    }

    public WebvttCssStyle ˏ(boolean z) {
        this.ॱˊ = z ? 1 : 0;
        return this;
    }

    public WebvttCssStyle ॱ(boolean z) {
        this.ˊॱ = z ? 1 : 0;
        return this;
    }

    public String ˋ() {
        return this.ˎ;
    }

    public WebvttCssStyle ˎ(String str) {
        this.ˎ = anr.ˎ(str);
        return this;
    }

    public int ॱॱ() {
        if (this.ॱॱ) {
            return this.ᐝ;
        }
        throw new IllegalStateException("Font color not defined");
    }

    public WebvttCssStyle ˎ(int i) {
        this.ᐝ = i;
        this.ॱॱ = true;
        return this;
    }

    public boolean ʽ() {
        return this.ॱॱ;
    }

    public int ᐝ() {
        if (this.ʽ) {
            return this.ʼ;
        }
        throw new IllegalStateException("Background color not defined.");
    }

    public WebvttCssStyle ॱ(int i) {
        this.ʼ = i;
        this.ʽ = true;
        return this;
    }

    public boolean ʼ() {
        return this.ʽ;
    }

    public Alignment ʻ() {
        return this.ʻॱ;
    }

    public int ͺ() {
        return this.ˋॱ;
    }

    public float ˊॱ() {
        return this.ͺ;
    }

    private static int ˎ(int i, String str, String str2, int i2) {
        if (str.isEmpty() || i == -1) {
            return i;
        }
        if (str.equals(str2)) {
            return i + i2;
        }
        return -1;
    }
}
